#include "checksum.hpp"

char Crypto::checksum(const char *buffer,unsigned int size){
    char f_checksum = 0x00;
    if ( buffer == nullptr ){
        return f_checksum;
    }
    for ( int n = 0; n < size; n++ ){
        f_checksum ^= buffer[n];
    }
    return f_checksum;
}